package vip.sweet.sys.modular.resources.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import vip.sweet.common.entity.CommonEntity;

import java.util.List;

/**
 * @author tianlianyin
 * @date 2024/11/11
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("sys_resource")
public class Resources extends CommonEntity {
    @Schema(description = "资源名称")
    private String name;
    @Schema(description = "资源路径")
    private String url;
    @Schema(description = "权限标识")
    private String authFlag;
    @Schema(description = "资源父Id")
    private String parentId;
    @Schema(description = "资源类型")
    private String type;
    @Schema(description = "资源图标")
    private String icon;
    @Schema(description = "子资源")
    @TableField(exist = false)//不映射数据库字段
    private List<Resources> children;
}
